package commands;

import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.transfer.TransferManager;
import jesss.commands.JesssCommand;
import jesss.commands.JesssCommandFactoryImpl;
import jesss.options.JesssOptions;
import org.junit.Before;
import org.junit.Test;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;

/**
 * User: Lee
 * Date: 8/27/13
 * Time: 10:07 PM
 */
public class DownloadDirectoryCommandTests extends CommandTestsBase {
    private AmazonS3 mockS3 = mock(AmazonS3.class);

    private JesssOptions mockJesssOptions = mock(JesssOptions.class);

    @Before
    public void setUp() throws Exception {
        stub(mockJesssOptions.getAmazonS3()).toReturn(mockS3);
        stub(mockJesssOptions.getCommandName()).toReturn("dd");
    }

    @Test
    public void CanDownloadDirectory() throws Exception {
        String[] args = {"-bn", "testBucket1", "-k", "key", "-td", "c:\\temp\\mytargetdir"};
        JesssCommand ddCommand = JesssCommandFactoryImpl.getInstance().createCommand(mockS3, mockJesssOptions.getCommandName(), mockJesssOptions.getShouldDisplayVerbose(), args);

    }

}
